package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class Result {

    private int beginIndex;
    private int endIndex;
    private ValueExpression resultExpression;

    public Result(ValueExpression resultExpression) {
        this.beginIndex = resultExpression.getBeginIndex();
        this.endIndex = resultExpression.getEndIndex();
        this.resultExpression = resultExpression;
    }

    public Result(int beginIndex, int endIndex) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public ValueExpression getResultExpression() {
        return resultExpression;
    }

    public boolean isNull() {
        return resultExpression == null;
    }

}
